package com.vip.service.shop.impl;


import com.vip.dao.shop.dao.ShopCommDao;
import com.vip.dao.shop.domain.ShopComm;
import com.vip.service.shop.ShopCommService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShopCommServiceImpl implements ShopCommService {

    @Autowired
    ShopCommDao shopCommDao;


    @Override
    public List<ShopComm> findAllByType(String type) {
        return shopCommDao.findShopCommsByType(type);
    }  

    @Override
    public List<ShopComm> findAll() {
        return shopCommDao.findShopCommsByType("商店");
    }

    @Override
    public ShopComm addComm(ShopComm comm) {
        return shopCommDao.save(comm);
    }

    @Override
    public ShopComm findCommByName(String name) {
        return shopCommDao.findShopCommByName(name);
    }
}
